package com.example.model;

import java.util.Date;

/**
 * 
 *
 * @author 
 */
public class Coupon {
    /**
     *
     */
    private Integer id;

    /**
     * 关联优惠券模板的主键
     *
     */
    private Integer templateId;

    /**
     * 创建用户
     *
     */
    private Long userId;

    /**
     * 优惠券码
     *
     */
    private String couponCode;

    /**
     * 领取时间
     *
     */
    private Date assignTime;

    /**
     * 优惠券的状态
     *
     */
    private Integer status;

    /**
     * This method returns the value of the database column coupon.id
     *
     * @return the value of coupon.id
     */
    public Integer getId() {
        return id;
    }

    /**
     * This method sets the value of the database column coupon.id
     *
     * @param id the value for coupon.id
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * This method returns the value of the database column coupon.template_id
     *
     * @return the value of coupon.template_id
     */
    public Integer getTemplateId() {
        return templateId;
    }

    /**
     * This method sets the value of the database column coupon.template_id
     *
     * @param templateId the value for coupon.template_id
     */
    public void setTemplateId(Integer templateId) {
        this.templateId = templateId;
    }

    /**
     * This method returns the value of the database column coupon.user_id
     *
     * @return the value of coupon.user_id
     */
    public Long getUserId() {
        return userId;
    }

    /**
     * This method sets the value of the database column coupon.user_id
     *
     * @param userId the value for coupon.user_id
     */
    public void setUserId(Long userId) {
        this.userId = userId;
    }

    /**
     * This method returns the value of the database column coupon.coupon_code
     *
     * @return the value of coupon.coupon_code
     */
    public String getCouponCode() {
        return couponCode;
    }

    /**
     * This method sets the value of the database column coupon.coupon_code
     *
     * @param couponCode the value for coupon.coupon_code
     */
    public void setCouponCode(String couponCode) {
        this.couponCode = couponCode;
    }

    /**
     * This method returns the value of the database column coupon.assign_time
     *
     * @return the value of coupon.assign_time
     */
    public Date getAssignTime() {
        return assignTime;
    }

    /**
     * This method sets the value of the database column coupon.assign_time
     *
     * @param assignTime the value for coupon.assign_time
     */
    public void setAssignTime(Date assignTime) {
        this.assignTime = assignTime;
    }

    /**
     * This method returns the value of the database column coupon.status
     *
     * @return the value of coupon.status
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * This method sets the value of the database column coupon.status
     *
     * @param status the value for coupon.status
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    /**
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", templateId=").append(templateId);
        sb.append(", userId=").append(userId);
        sb.append(", couponCode=").append(couponCode);
        sb.append(", assignTime=").append(assignTime);
        sb.append(", status=").append(status);
        sb.append("]");
        return sb.toString();
    }
}